home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / AppleTalk Remote Access / NetComm ARA Scripts V1.1 / NetComm Smart⁄Auto 1234 < prev    next >
Encoding:
Text File  |  1994-04-07  |  2.3 KB  |  164 lines  |  [mlts/slnk]

  1. !NetComm SmartModem & AutoModem 1234SA or 2400SA - 3rd December 1993 - NJS - v1.0
  2. !
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 2400, 0, 8, 1
  8. dtrset
  9. write "AT&F\13"
  10. pause 20
  11. @LABEL 2
  12. matchclr
  13. matchstr 1 7 "OK\13\10"
  14. matchstr 2 3 "ERROR\13\10"
  15. pause 5
  16. write "ATB2X1E0\13"
  17. matchread 30
  18. jump 59
  19. !
  20. !
  21. @LABEL 3
  22. matchclr
  23. matchstr 1 7 "OK\13\10"
  24. write "ATZ\13"
  25. matchread 30
  26. jump 59
  27. !
  28. !
  29. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  30. @LABEL 7
  31. ifstr 2 8 "1"
  32. matchclr
  33. matchstr 1 8 "OK\13\10"
  34. write "ATM0\13"
  35. matchread 30
  36. jump 59
  37. !
  38. ! The modem is ready so enable answering, or originate a call
  39. !
  40. @LABEL 8
  41. pause 5
  42. ifANSWER 30
  43. note "Dialing ^1" 3
  44. write "ATDT^1\13"
  45. !
  46.  
  47. @LABEL 9
  48. matchstr 1 11 "CONNECT 1200"
  49. matchstr 2 12 "CONNECT 2400"
  50. matchstr 3 50 "NO CARRIER"
  51. matchstr 4 50 "ERROR"
  52. matchstr 5 52 "NO DIALTONE"
  53. matchstr 6 53 "BUSY"
  54. matchstr 7 54 "NO ANSWER"
  55. matchread 700
  56. jump 59
  57. !
  58. @LABEL 11
  59. note "Communicating at 1200 bps." 2
  60. serreset 1200, 0, 8, 1
  61. jump 15
  62. !
  63. @LABEL 12
  64. note "Communicating at 2400 bps." 2
  65. serreset 2400, 0, 8, 1
  66. !
  67. @LABEL 15
  68. ifANSWER 16
  69. pause 30
  70. @LABEL 16
  71. exit 0
  72. !
  73. ! Set up the modem to answer
  74. @LABEL 30
  75. write "ATS0=2\13"
  76. matchstr 1 31 "OK\13\10"
  77. matchread 30
  78. jump 59
  79. !
  80. @LABEL 31
  81. matchstr 1  32 "RING"
  82. matchstr 2  11 "CONNECT 1200"
  83. matchstr 3  12 "CONNECT 2400"
  84. matchstr 4  50 "NO CARRIER"
  85. matchstr 5  50 "ERROR"
  86. matchstr 6  52 "NO DIALTONE"
  87. matchstr 7  53 "BUSY"
  88. matchstr 8  54 "NO ANSWER"
  89. matchread 700
  90. jump 31
  91. !
  92. @LABEL 32
  93. userhook 1
  94. note "Answering phone…" 2
  95. jump 31
  96. !
  97. ! 50: error messages
  98. ! No carrier
  99. @LABEL 50
  100. exit -6021
  101. ! No Dial Tone
  102. @LABEL 52
  103. exit -6020
  104. ! Busy
  105. @LABEL 53
  106. exit -6022
  107. ! No Answer
  108. @LABEL 54
  109. exit -6023
  110. ! Modem error
  111. @LABEL 59
  112. exit -6019
  113. !
  114. ! Hang up the modem
  115. !
  116. @HANGUP
  117. @LABEL 60
  118. settries 0
  119. @LABEL 61
  120. write "ATH\13"
  121. matchclr
  122. matchstr 1 62 "NO CARRIER\13\10"
  123. matchstr 2 62 "OK\13\10"
  124. matchstr 3 62 "ERROR\13\10"
  125. matchread 30
  126. inctries
  127. iftries 3 62
  128. ! no response, try escape sequence
  129. matchclr
  130. matchstr 1 61 "OK\13\10"
  131. write "+++"
  132. matchread 20
  133. jump 61
  134. !
  135. ! Recall the factory settings
  136. !
  137. @LABEL 62
  138. matchclr
  139. matchstr 1 64 "OK\13\10"
  140. matchstr 2 63 "ERROR\13\10"
  141. write "AT&f\13"
  142. matchread 30
  143. !
  144. ! the &F failed, Try ATZ
  145. !
  146. @LABEL 63
  147. matchclr
  148. matchstr 1 65 "OK\13\10"
  149. write "ATZ\13"
  150. matchread 30
  151. !
  152. ! Turn off auto answer
  153. !
  154. @LABEL 64
  155. write "ATS0=0\13"
  156. matchclr
  157. matchstr 1 65 "OK\13\10"
  158. matchread 30
  159. !
  160. @LABEL 65
  161. exit 0
  162.  
  163.